﻿using System.Diagnostics;
using System.IO;

namespace LaoLuo
{
    public class ConsoleHelper
    {
        const string NotepadCommand = @"notepad.exe";
        public static void OpenWithNotepad(string text)
        {
            var path = Path.GetTempFileName();
            File.WriteAllText(path, text);
            var args = path;
            Debug.WriteLine(path);
            var process = new Process
            {
                StartInfo =
                {
                    FileName = NotepadCommand,
                    Arguments = args
                }
            };
            process.Start();
        }
    }
}
